package com.zhl.media.app.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.zhl.media.app.mvp.contract.WorkProductContract;
import com.zhl.media.app.mvp.model.WorkProductModel;


@Module
public class WorkProductModule {
    private WorkProductContract.View view;

    /**
     * 构建WorkProductModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public WorkProductModule(WorkProductContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    WorkProductContract.View provideWorkProductView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    WorkProductContract.Model provideWorkProductModel(WorkProductModel model) {
        return model;
    }
}